/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.site.user.pojo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author zhanjun
 */
@Entity
@Table(name = "tb_region")
@NamedQueries({
    @NamedQuery(name = "TbRegion.findAll", query = "SELECT t FROM TbRegion t"),
    @NamedQuery(name = "TbRegion.findByIdRegion", query = "SELECT t FROM TbRegion t WHERE t.idRegion = :idRegion"),
    @NamedQuery(name = "TbRegion.findByRegionName", query = "SELECT t FROM TbRegion t WHERE t.regionName = :regionName"),
    @NamedQuery(name = "TbRegion.findByRegion", query = "SELECT t FROM TbRegion t WHERE t.region = :region"),
    @NamedQuery(name = "TbRegion.findByPidRegion", query = "SELECT t FROM TbRegion t WHERE t.pidRegion = :pidRegion")})
public class TbRegion implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "id_region")
    private String idRegion;
    @Column(name = "region_name")
    private String regionName;
    @Column(name = "region")
    private String region;
    @Column(name = "pid_region")
    private String pidRegion;

    public TbRegion() {
    }

    public TbRegion(String idRegion) {
        this.idRegion = idRegion;
    }

    public String getIdRegion() {
        return idRegion;
    }

    public void setIdRegion(String idRegion) {
        this.idRegion = idRegion;
    }

    public String getRegionName() {
        return regionName;
    }

    public void setRegionName(String regionName) {
        this.regionName = regionName;
    }

    public String getRegion() {
        return region;
    }

    public void setRegion(String region) {
        this.region = region;
    }

    public String getPidRegion() {
        return pidRegion;
    }

    public void setPidRegion(String pidRegion) {
        this.pidRegion = pidRegion;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idRegion != null ? idRegion.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TbRegion)) {
            return false;
        }
        TbRegion other = (TbRegion) object;
        if ((this.idRegion == null && other.idRegion != null) || (this.idRegion != null && !this.idRegion.equals(other.idRegion))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.site.user.pojo.TbRegion[idRegion=" + idRegion + "]";
    }

}
